package com.gxuwz.medical.tools;

import java.util.Date;

import org.joda.time.DateTime;
import org.joda.time.format.DateTimeFormat;
import org.joda.time.format.DateTimeFormatter;

/**
 * 处理时间类
 * @author Lm
 *
 */
public class TimeUtils {
	 public static String formatDate(Date date) {
	        DateTime dateTime = new DateTime(date);
	        String formatStr = "yyyy-MM-dd";
	        return dateTime.toString(formatStr);
	    }
	 
	    public static Date parse(String strDate) {
	        DateTimeFormatter dateTimeFormat = DateTimeFormat.forPattern("yyyy-MM-dd");
	        DateTime dateTime = DateTime.parse(strDate, dateTimeFormat);
	        dateTime = dateTime.plusDays(1);
	        return dateTime.toDate();
	    }
	    
}
